# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer:
pkgname=ma1sd
pkgver=2.5.0
pkgrel=1
pkgdesc="Federated Matrix Identity Server"
url="https://github.com/ma1uta/ma1sd/"
arch="noarch !riscv64" # openjdk8-jre missing
license="AGPL-3.0-or-later"
install="$pkgname.pre-install"
depends="java-jre-headless"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar::https://github.com/ma1uta/ma1sd/releases/download/$pkgver/ma1sd-shadow.tar
	ma1sd.initd
	ma1sd.confd
	"
options="!check" # No tests in pre-compiled package
builddir="$srcdir/ma1sd-shadow"

package() {
	install -Dm755 bin/ma1sd "$pkgdir"/usr/bin/ma1sd
	install -Dm644 lib/ma1sd.jar "$pkgdir"/usr/lib/ma1sd.jar
	install -Dm755 "$srcdir"/ma1sd.initd "$pkgdir"/etc/init.d/ma1sd
	install -Dm644 "$srcdir"/ma1sd.confd "$pkgdir"/etc/conf.d/ma1sd
}

sha512sums="
f686195ace341fbafd2877e875bc8823c5b0be9903440a8f7561dfc743b493e5aa148ada7b29f659b505ae7f6c3a02f367bb235ea65b2d48aafcc5f81b8d1e0c  ma1sd-2.5.0.tar
4225641b2c7dcaa18ee5ee9a544c4299c6cb11b263da007e101f44394d90aeea86e98b273526bdf121f370d4cf60290d72a9364f953ced0ec9d5deb4da96bd13  ma1sd.initd
7c3cef61c4d414903ea68de83127c21503875a39a5b4408747862479e8107bf3e6f454af0f1d096d5f69f3524fca9d3802e812d9e81576c271e109e048473bd5  ma1sd.confd
"
